package com.vlada.studzad.data;

import java.util.ArrayList;
import java.util.List;

import com.vlada.studzad.model.Student;

public class MockDataStudentSource{

	private List<Student> students = new ArrayList<Student>();

	public MockDataStudentSource() {
		addStudent(new Student("570/05", "Vladimir", "Markovic", "wp3", "1", "FON"));
		addStudent(new Student("580/05", "Zeljko", "Lazarevic", "zelj", "1", "FON"));
		addStudent(new Student("48/05", "Mladen", "Matovic", "mla", "1", "FON"));
	}

	public List<Student> getAllStudents() {
		return students;
	}


	public Student getStudentByID(String ID) {
		for (Student s : students) {
			if(s.getIndex().equals(ID)){
				return s;
			}
		}
		return null;
	}

	public void addStudent(Student st) {
		students.add(st);		
	}

}
